package com.dingjian.broker.enums;
/**
 * 客户重点重度分类
 * @author:gu hui
 *
 */
public enum CustomerImportTypeEnum {
	EMPTY("EMPTY","待设置"),
	MAIN_ATTACK("MAIN_ATTACK","主攻"),
	ATTENTION("ATTENTION","关注"),
	TRAIN("TRAIN","培养"),
	TO_PUBLIC("TO_PUBLIC","转公")
	;
	private CustomerImportTypeEnum(){}
	private CustomerImportTypeEnum(String key,String description){
		this.description=description;
		this.key=key;
	}
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	private String key;
	private String description;
	/**
	 * 取枚举的json字符串
	 * @return
	 */
	public static String getJsonStr(){
		CustomerImportTypeEnum[] enums = CustomerImportTypeEnum.values();
		StringBuffer jsonStr = new StringBuffer("[");
		for (CustomerImportTypeEnum senum : enums) {
			if(!"[".equals(jsonStr.toString())){
				jsonStr.append(",");
			}
			jsonStr.append("{id:'")
					.append(senum)
					.append("',name:'")
					.append(senum.getDescription())
					.append("',value:'")
					.append(senum)
					.append("'}");
		}
		jsonStr.append("]");
		return jsonStr.toString();
	}
}
